From cfa1ab4fb219b713df8da5571388e31903ed86f2 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 18 Jul 2007 08:54:43 +0000 Subject: [PATCH] (change-log-mode): Use fill-nobreak-predicate to avoid that filling introduces lines with a single asterisk. --- lisp/add-log.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/add-log.el b/lisp/add-log.el index 3ec00b81b35..0ff82bba2f5 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -699,6 +699,11 @@ Runs `change-log-mode-hook'. show-trailing-whitespace t) (set (make-local-variable 'fill-paragraph-function) 'change-log-fill-paragraph) + ;; Avoid that filling leaves behind a single "*" on a line. + (add-hook 'fill-nobreak-predicate + '(lambda () + (looking-back "^\\s *\\*\\s *" (line-beginning-position))) + nil t) (set (make-local-variable 'indent-line-function) 'change-log-indent) (set (make-local-variable 'tab-always-indent) nil) ;; We really do want "^" in paragraph-start below: it is only the -- 2.30.2